import request from '@/utils/request';

export async function saveIndicator(params) {
  return request('/rest/v1/indicator', {
    method: 'POST',
    data: params,
  });
}

export async function listIndicator() {
  return request('/rest/v1/indicator/list', {
    method: 'GET'
  });
}

export function getIndicator(params) {
  return request(`/rest/v1/indicator/id/${params.id}`, {
    method: 'GET',
  });
}

export async function deleteIndicator(params) {
  return request(`/rest/v1/indicator/${params.id}`, {
    method: 'DELETE'
  });
}

export async function saveAbility(params) {
  return request('/rest/v1/ability', {
    method: 'POST',
    data: params,
  });
}

export async function listAbility() {
  return request('/rest/v1/ability/list', {
    method: 'GET'
  });
}

export async function deleteAbility(params) {
  return request(`/rest/v1/ability/${params.id}`, {
    method: 'DELETE'
  });
}
export async function saveJob(params) {
  return request('/rest/v1/job', {
    method: 'POST',
    data: params,
  });
}

export async function listJob() {
  return request('/rest/v1/job/list', {
    method: 'GET'
  });
}

export async function deleteJob(params) {
  return request(`/rest/v1/job/${params.id}`, {
    method: 'DELETE'
  });
}
